package com.lizheng.yunservice.travel.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lizheng.yunservice.common.domain.PageQuery;
import com.lizheng.yunservice.common.page.TableDataInfo;
import com.lizheng.yunservice.travel.doamin.VtpCultural;
import com.lizheng.yunservice.travel.doamin.VtpCulturalCategory;
import com.lizheng.yunservice.travel.doamin.vo.VtpCulturalVo;
import com.lizheng.yunservice.travel.mapper.VtpCulturalMapper;
import com.lizheng.yunservice.travel.service.IVtpCulturalService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 文创信息Service业务层处理
 *
 * @author lizheng
 * @date 2024-12-19
 */
@RequiredArgsConstructor
@Service
public class VtpCulturalServiceImpl implements IVtpCulturalService {

    private final VtpCulturalMapper baseMapper;

//    /**
//     * 查询文创信息分页列表
//     */
//    @Override
//    public TableDataInfo<VtpCulturalVo> queryPageList(VtpCulturalBo bo, PageQuery pageQuery) {
//        Page<VtpCulturalVo> result = baseMapper.selectVoPage(pageQuery.build(), bo);
//        return TableDataInfo.build(result);
//    }

    /**
     * 根据类别ID查询文创列表
     */
    @Override
    public List<VtpCultural> queryListByCategoryId(Long categoryId) {
        return baseMapper.selectListByCategoryId(categoryId);
    }

    /**
     * 查询所有文创类别
     */
    @Override
    public List<VtpCulturalCategory> queryAllCategories() {
        return baseMapper.selectAllCategories();
    }
} 